package com.isoftstone.merchant.dao.role;

import com.isoftstone.merchant.entity.role.PRoleUser;
import com.isoftstone.merchant.entity.role.PRoleUserKey;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface PRoleUserMapper {


    //保存用户和角色的I
    void saveUserRole(@Param(value = "userId") String userId, @Param(value = "roleId") String roleId) throws Exception;

    //根据userId删除Sys_Use_Role表中的userId重复的用户信息
    void deleteUserRolex(String userId) throws Exception;
    /**
     * 根据用户名获取对应角色
     * @param userId
     * @return
     * @throws Exception
     */

    List<PRoleUser> getRolesByUserId(String userId) throws Exception;

    List<String> getMenuIdsByUserId(@Param("comUserCode") String comUserCode) throws Exception;

    void deleteUserRole(String userId) throws Exception;

    String getOperatorId(@Param("roleId") int roleId) throws Exception;

    List<PRoleUserKey> getroleIdByOperatorId(String operatorId) throws Exception;
}